import { applyMiddleware, createStore } from 'redux'
import rootReducer from './reducers/index'
import createSagaMiddleware from 'redux-saga'
import rootSage from './sagas'


const sageMiddleware = createSagaMiddleware()
const store = createStore(
    rootReducer, 
    applyMiddleware(sageMiddleware)
)
sageMiddleware.run(rootSage)

export default store